#include "stdafx.h"
#define BOOST_TEST_MODULE test_bmock_expectation
#include <boost/test/auto_unit_test.hpp>
#include <vector>
#include "detail/bmock_exp_checker.hpp"
#include "detail/bmock_test_control_tools.hpp"

namespace bmock {
	static const control_tools_ptr tl(new test_control_tools());
	static const char              func1[] = "FUNC1";
	static const char              func2[] = "FUNC2";
	static const func_spec         fs1(func1,location(__FILE__,__LINE__));
	static const func_spec         fs2(func2,location(__FILE__,__LINE__));
	__BMOCK_ARG_LIST(0,());

	BOOST_AUTO_TEST_CASE(test_check_func_descr_equal) {
		exp_checker chk(tl);

		chk.set_location(location(__FILE__,__LINE__+1));
		BOOST_CHECK_NO_THROW(chk.check_func(fs1,fs1,arg_list(args_,1)));
	}

	BOOST_AUTO_TEST_CASE(test_check_func_descr_not_equal) {
		exp_checker chk(tl);

		chk.set_location(location(__FILE__,__LINE__+1));
	}

	BOOST_AUTO_TEST_CASE(test_not_received) {
		exp_checker chk(tl);

		chk.set_location(location(__FILE__,__LINE__+1));
	}
}
